<section class="content-header">
    <h1>
        设备属性配置
    </h1>
</section>

<!-- Main content -->
<section class="content">
    <div class="row">
        <div class="col-md-12">
            <div class="box box-default">
                <div class="box-header with-border">
                    <h3 class="box-title">设备属性数据</h3>
                    <div class="box-tools pull-right">
                        <button type="button" (click)="saveChanges()" class="btn btn-info btn-sm" data-toggle="tooltip" title="保存">
                            <i class="fa fa-save"></i>
                        </button>
                        <button type="button" (click)="refresh()" class="btn btn-info btn-sm" data-toggle="tooltip" title="刷新">
                            <i class="fa fa-refresh"></i>
                        </button>
                        <button type="button" class="btn btn-info btn-sm" data-widget="collapse">
                            <i class="fa fa-minus"></i>
                        </button>
                    </div>
                </div>
                <!-- /.box-header -->
                <div class="box-body">
                    <dx-data-grid [dataSource]="items" (onRowUpdated)="updateResourceAttribute($event)" [showColumnLines]="true" [showRowLines]="true"
                        [showBorders]="true" [rowAlternationEnabled]="true">
                        <dxo-paging [pageSize]="10"></dxo-paging>
                        <dxo-pager [showPageSizeSelector]="true" [allowedPageSizes]="[10, 20, 100]" [showInfo]="true">
                        </dxo-pager>
                        <dxo-editing mode="cell" [allowUpdating]="true">
                        </dxo-editing>
                        <dxo-filter-row [visible]="true" [applyFilter]="auto"></dxo-filter-row>
                        <dxo-editing mode="cell" [allowUpdating]="true">
                        </dxo-editing>
                        <dxi-column [allowEditing]="false" dataField="subArea" caption="生产线" [width]="100">
                        </dxi-column>
                        <dxi-column [allowEditing]="false" dataField="equipment" caption="设备" [width]="100">
                        </dxi-column>
                        <dxi-column [allowEditing]="true" dataField="stationCode" caption="工位编码" [width]="100">
                        </dxi-column>
                        <dxi-column [allowEditing]="true" dataField="stationName" caption="工位名称" [width]="100">
                        </dxi-column>
                        <dxi-column [allowEditing]="true" dataField="weight" caption="权重" [width]="60">
                        </dxi-column>
                        <dxi-column [allowEditing]="true" dataField="equipmentType" caption="设备类型" [width]="100">
                            <dxo-lookup [dataSource]="equipmentTypeItems" displayExpr="fullName" valueExpr="code">
                            </dxo-lookup>
                        </dxi-column>
                        <dxi-column [allowEditing]="true" dataField="supplier" caption="供应商" [width]="120">
                            <dxo-lookup [dataSource]="supplierItems" displayExpr="fullName" valueExpr="code">
                            </dxo-lookup>
                        </dxi-column>
                        <dxi-column [allowEditing]="true" dataField="operationNo" caption="岗位赋值" [width]="100">
                        </dxi-column>
                        <dxi-column [allowEditing]="true" dataField="loadOP" caption="上线工位" [width]="100">
                            <dxo-lookup [dataSource]="boolSelectItems" displayExpr="text" valueExpr="value">
                            </dxo-lookup>
                        </dxi-column>
                        <dxi-column [allowEditing]="true" dataField="unloadOP" caption="下线工位" [width]="100">
                            <dxo-lookup [dataSource]="boolSelectItems" displayExpr="text" valueExpr="value">
                            </dxo-lookup>
                        </dxi-column>
                        <dxi-column [allowEditing]="true" dataField="slowestOP" caption="瓶颈工位" [width]="100">
                            <dxo-lookup [dataSource]="boolSelectItems" displayExpr="text" valueExpr="value">
                            </dxo-lookup>
                        </dxi-column>
                        <!-- <dxi-column [allowEditing]="true" dataField="slowestCT" caption="BN CT" [width]="60">
                        </dxi-column> -->
                        <dxi-column [allowEditing]="true" dataField="lineAnalysisFilter" caption="故障整线分析" [width]="100">
                            <dxo-lookup [dataSource]="boolSelectItems" displayExpr="text" valueExpr="value">
                            </dxo-lookup>
                        </dxi-column>
                        <dxi-column [allowEditing]="true" dataField="andonAnalyse" caption="Andon分析" [width]="100">
                            <dxo-lookup [dataSource]="boolSelectItems" displayExpr="text" valueExpr="value">
                            </dxo-lookup>
                        </dxi-column>
                        <dxi-column [allowEditing]="true" dataField="sectionName" caption="工段名" [width]="100">
                        </dxi-column>
                        <dxi-column [allowEditing]="true" dataField="ftpAnalyse" caption="FTA分析" [width]="100">
                            <dxo-lookup [dataSource]="boolSelectItems" displayExpr="text" valueExpr="value">
                            </dxo-lookup>
                        </dxi-column>
                        <dxi-column [allowEditing]="true" dataField="saaAnalyse" caption="SAA分析" [width]="100">
                            <dxo-lookup [dataSource]="boolSelectItems" displayExpr="text" valueExpr="value">
                            </dxo-lookup>
                        </dxi-column>
                        <dxi-column [allowEditing]="true" dataField="targetJPH" caption="JPH" [width]="60">
                        </dxi-column>
                        <dxi-column [allowEditing]="true" dataField="powerCo" caption="额定电耗" [width]="90">
                        </dxi-column>
                    </dx-data-grid>
                </div>
            </div>
        </div>
    </div>
</section>